.class public Lcom/adview/adapters/LsenseAdapter;
.super Lcom/adview/adapters/AdViewAdapter;
.source "LsenseAdapter.java"

# interfaces
.implements Lcom/l/adlib_android/AdListenerEx;


# instance fields
.field private adView:Lcom/l/adlib_android/AdView;


# direct methods
.method public constructor <init>(Lcom/adview/AdViewLayout;Lcom/adview/obj/Ration;)V
    .locals 1
    .parameter "adViewLayout"
    .parameter "ration"

    .prologue
    .line 22
    invoke-direct {p0, p1, p2}, Lcom/adview/adapters/AdViewAdapter;-><init>(Lcom/adview/AdViewLayout;Lcom/adview/obj/Ration;)V

    .line 20
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/adview/adapters/LsenseAdapter;->adView:Lcom/l/adlib_android/AdView;

    .line 23
    return-void
.end method


# virtual methods
.method public OnAcceptAd(I)V
    .locals 3
    .parameter "arg0"

    .prologue
    .line 92
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v1

    sget-object v2, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v1, v2, :cond_0

    .line 93
    const-string v1, "AdView SDK v1.7.0"

    const-string v2, "Lsense success"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 95
    :cond_0
    iget-object v1, p0, Lcom/adview/adapters/LsenseAdapter;->adView:Lcom/l/adlib_android/AdView;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcom/l/adlib_android/AdView;->setOnAdListenerEx(Lcom/l/adlib_android/AdListenerEx;)V

    .line 97
    iget-object v1, p0, Lcom/adview/adapters/LsenseAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/adview/AdViewLayout;

    .line 98
    .local v0, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v0, :cond_1

    .line 106
    :cond_1
    return-void
.end method

.method public OnConnectFailed(Ljava/lang/String;)V
    .locals 3
    .parameter "arg0"

    .prologue
    .line 75
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v1

    sget-object v2, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v1, v2, :cond_0

    .line 76
    const-string v1, "AdView SDK v1.7.0"

    const-string v2, "Lsense failure"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 78
    :cond_0
    iget-object v1, p0, Lcom/adview/adapters/LsenseAdapter;->adView:Lcom/l/adlib_android/AdView;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcom/l/adlib_android/AdView;->setOnAdListenerEx(Lcom/l/adlib_android/AdListenerEx;)V

    .line 80
    iget-object v1, p0, Lcom/adview/adapters/LsenseAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/adview/AdViewLayout;

    .line 81
    .local v0, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v0, :cond_1

    .line 86
    :goto_0
    return-void

    .line 84
    :cond_1
    iget-object v1, v0, Lcom/adview/AdViewLayout;->adViewManager:Lcom/adview/AdViewManager;

    invoke-virtual {v1}, Lcom/adview/AdViewManager;->resetRollover_pri()V

    goto :goto_0
.end method

.method public handle()V
    .locals 12

    .prologue
    .line 28
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v0

    sget-object v2, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v0, v2, :cond_0

    .line 29
    const-string v0, "AdView SDK v1.7.0"

    const-string v2, "Into Lsense"

    invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 30
    :cond_0
    iget-object v0, p0, Lcom/adview/adapters/LsenseAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Lcom/adview/AdViewLayout;

    .line 31
    .local v9, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v9, :cond_2

    .line 72
    :cond_1
    :goto_0
    return-void

    .line 35
    :cond_2
    iget-object v11, v9, Lcom/adview/AdViewLayout;->extra:Lcom/adview/obj/Extra;

    .line 36
    .local v11, extra:Lcom/adview/obj/Extra;
    iget v0, v11, Lcom/adview/obj/Extra;->bgRed:I

    iget v2, v11, Lcom/adview/obj/Extra;->bgGreen:I

    iget v3, v11, Lcom/adview/obj/Extra;->bgBlue:I

    invoke-static {v0, v2, v3}, Landroid/graphics/Color;->rgb(III)I

    move-result v4

    .line 37
    .local v4, bgColor:I
    iget v0, v11, Lcom/adview/obj/Extra;->fgRed:I

    iget v2, v11, Lcom/adview/obj/Extra;->fgGreen:I

    iget v3, v11, Lcom/adview/obj/Extra;->fgBlue:I

    invoke-static {v0, v2, v3}, Landroid/graphics/Color;->rgb(III)I

    move-result v5

    .line 38
    .local v5, fgColor:I
    iget-object v0, v9, Lcom/adview/AdViewLayout;->activityReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/app/Activity;

    .line 39
    .local v1, activity:Landroid/app/Activity;
    if-eqz v1, :cond_1

    .line 44
    const/4 v0, 0x0

    :try_start_0
    iput-object v0, p0, Lcom/adview/adapters/LsenseAdapter;->adView:Lcom/l/adlib_android/AdView;

    .line 45
    new-instance v0, Lcom/l/adlib_android/AdView;

    .line 47
    iget-object v2, p0, Lcom/adview/adapters/LsenseAdapter;->ration:Lcom/adview/obj/Ration;

    iget-object v2, v2, Lcom/adview/obj/Ration;->key:Ljava/lang/String;

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

    move-result v2

    .line 48
    const/16 v3, 0x41

    const/16 v6, 0x41

    const/16 v7, 0x41

    invoke-static {v3, v6, v7}, Landroid/graphics/Color;->rgb(III)I

    move-result v3

    .line 51
    const/16 v6, 0xff

    const/4 v7, 0x5

    .line 52
    const/4 v8, 0x1

    invoke-direct/range {v0 .. v8}, Lcom/l/adlib_android/AdView;-><init>(Landroid/content/Context;IIIIIIZ)V

    .line 45
    iput-object v0, p0, Lcom/adview/adapters/LsenseAdapter;->adView:Lcom/l/adlib_android/AdView;

    .line 63
    iget-object v0, p0, Lcom/adview/adapters/LsenseAdapter;->adView:Lcom/l/adlib_android/AdView;

    invoke-virtual {v0, p0}, Lcom/l/adlib_android/AdView;->setOnAdListenerEx(Lcom/l/adlib_android/AdListenerEx;)V

    .line 64
    iget-object v0, v9, Lcom/adview/AdViewLayout;->adViewManager:Lcom/adview/AdViewManager;

    invoke-virtual {v0}, Lcom/adview/AdViewManager;->resetRollover()V

    .line 65
    iget-object v0, v9, Lcom/adview/AdViewLayout;->handler:Landroid/os/Handler;

    new-instance v2, Lcom/adview/AdViewLayout$ViewAdRunnable;

    iget-object v3, p0, Lcom/adview/adapters/LsenseAdapter;->adView:Lcom/l/adlib_android/AdView;

    invoke-direct {v2, v9, v3}, Lcom/adview/AdViewLayout$ViewAdRunnable;-><init>(Lcom/adview/AdViewLayout;Landroid/view/ViewGroup;)V

    invoke-virtual {v0, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 66
    invoke-virtual {v9}, Lcom/adview/AdViewLayout;->rotateThreadedDelayed()V
    :try_end_0
    .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 68
    :catch_0
    move-exception v0

    move-object v10, v0

    .line 69
    .local v10, e:Ljava/lang/IllegalArgumentException;
    invoke-virtual {v9}, Lcom/adview/AdViewLayout;->rollover()V

    goto :goto_0
.end method
